﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Shapes;
using System.Windows.Media;

namespace WPFDemo
{
    public partial class WPFDemoWindow : Window
    {
        public WPFDemoWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
        }


        #region Drag Scroller


        private void CheckBox_Click(object sender, RoutedEventArgs e)
        {
            if (ShowScrollbarsCheckbox.IsChecked.GetValueOrDefault())
            {
                ExampleDragScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
                ExampleDragScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            }
            else
            {
                ExampleDragScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
                ExampleDragScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            }
        }

        private void UpdateDragScrollFriction(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            ExampleDragScrollViewer.Friction = e.NewValue;
        }

        #endregion


       }
}
